package com.robot.topology.strategy.deterministic;

import com.robot.topology.graph.domain.Edge;
import com.robot.topology.tools.StrategyTools;

public class BushMosteller extends Deterministic{

	/**
	 * @param args
	 */
	public static final Double BMRatio = (double)0.05;
	public static final Double BMReward = (double) 1;
	public static final Double BMPunish = (double) 0;
	
	public BushMosteller () {
		this.setRatio(BMRatio);
		this.setReward(BMReward);
		this.setPunishment(BMPunish);
	}
	

	@Override
	public void updateEdgeToReward(Edge edgeTUpdate) {
		edgeTUpdate.setWeight(StrategyTools.linearBM(edgeTUpdate.getWeight(),  this.getRatio(), this.getReward()));
		
	}

	public void updateEdgeToPunish(Edge edgeTUpdate) {
		edgeTUpdate.setWeight(StrategyTools.linearBM(edgeTUpdate.getWeight(),  this.getRatio(), this.getPunishment()));
		
	}
	
}
